class GlobalState:
    def __init__(self):
        self.image = None
        self.sam = None
        self.predictor = None
        self.input_point = None
        self.input_label = None
        self.input_box_arr = None
        self.mask_input = None
        self.multimask_output = None
        self.input_stop = None
        self.masks = None
        self.scores = None
        self.logits = None
        self.input_point_arr = None
        self.input_label_arr = None
        self.image_path = None
        self.image_path = None

# 创建一个 GlobalState 的实例作为全局变量
global_state = GlobalState()